
///接口
class UserBaseInfoDtoData{
  int lastTime;
  int hasNext;
  List list=[];

  UserBaseInfoDtoData({this.lastTime, this.hasNext, this.list});



  UserBaseInfoDtoData.fromJson(Map<String, dynamic> json) {
    lastTime = json["lastTime"];
    hasNext = json["hasNext"];
    if (json["list"] != null) {
      json["list"].forEach((v) {
        if (v is UserBaseInfoDto) {
          list.add(v);
        }else{
          list.add(UserBaseInfoDto.fromJson(v));
        }
      });
    }
  }


  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["lastTime"] = lastTime;
    map["hasNext"] = hasNext;
    map["list"] = list;
    return map;
  }
}
///用户的基本信息
class UserBaseInfoDto {
  int uid; //账户Id
  String phone; //手机号
  int type; //类型 0-用户 1-教练 2-管理
  int subType; // 子类型 0-管理运营后台 1-app官方运营账号
  String nickName; //昵称
  String avatarUri; //头像
  String description; //个性签名
  String birthday; //生日
  int sex; //性别 0-未知 1-男 2-女
  String constellation; //星座
  String cityCode; //城市编码
  int longitude; //经度
  int latitude; //纬度

  String password; //密码
  String address; //详细地址
  List<String> source = []; //已绑定的其他账号标识  数组
  int createTime; //创建时间
  int updateTime; //更新时间
  int deletedTime; //删除时间

  int status; //用户状态，0删除 ，1不可使用[封禁]，2可用
  int age; //年龄
  int isPerfect; //0 未完善 1 完善
  int isPhone; //是否绑定手机号

  UserBaseInfoDto(
      {this.uid,
      this.phone,
      this.type,
      this.subType,
      this.nickName,
      this.avatarUri,
      this.description,
      this.birthday,
      this.sex,
      this.constellation,
      this.cityCode,
      this.longitude,
      this.latitude,
      this.password,
      this.address,
      this.source,
      this.createTime,
      this.updateTime,
      this.deletedTime,
      this.status,
      this.age,
      this.isPerfect,
      this.isPhone});

  @override
  String toString() {
    return toJson().toString();
  }

  UserBaseInfoDto.fromJson(Map<String, dynamic> json) {
    uid = json["uid"];
    phone = json["phone"];
    type = json["type"];
    subType = json["isPhone"];
    nickName = json["nickName"];
    avatarUri = json["avatarUri"];
    description = json["description"];

    birthday = json["birthday"];
    sex = json["sex"];
    constellation = json["constellation"];
    cityCode = json["cityCode"];
    longitude = json["longitude"];
    latitude = json["latitude"];
    password = json["password"];

    address = json["address"];
    createTime = json["createTime"];
    updateTime = json["updateTime"];
    deletedTime = json["deletedTime"];
    status = json["status"];
    age = json["age"];
    isPerfect = json["isPerfect"];
    isPhone = json["isPhone"];

    source = json["source"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["uid"] = uid;
    map["phone"] = phone;
    map["type"] = type;
    map["isPhone"] = isPhone;
    map["nickName"] = nickName;
    map["avatarUri"] = avatarUri;
    map["description"] = description;

    map["birthday"] = birthday;
    map["sex"] = sex;
    map["constellation"] = constellation;
    map["cityCode"] = cityCode;
    map["longitude"] = longitude;
    map["latitude"] = latitude;
    map["password"] = password;

    map["address"] = address;
    map["createTime"] = createTime;
    map["updateTime"] = updateTime;
    map["deletedTime"] = deletedTime;
    map["status"] = status;
    map["age"] = age;
    map["isPerfect"] = isPerfect;
    map["isPhone"] = isPhone;
    map["source"] = source;
    return map;
  }
}

class ListString {
  String biaoshi;

  ListString({this.biaoshi});
}

///用户身体信息
class UserWBodyInformation {
  int uid; //用户Id
  int trainingMSeconds; //训练时间
  double weight; //体重
  int albumNum; //相册数量

  UserWBodyInformation(
      {this.uid, this.trainingMSeconds, this.weight, this.albumNum});

  UserWBodyInformation.fromJson(Map<String, dynamic> json) {
    uid = json["uid"];
    trainingMSeconds = json["trainingMSeconds"];
    weight = json["weight"];
    albumNum = json["albumNum"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["uid"] = uid;
    map["trainingMSeconds"] = trainingMSeconds;
    map["weight"] = weight;
    map["albumNum"] = albumNum;
    return map;
  }

  @override
  String toString() {
    return toJson().toString();
  }
}

///黑名单
class UserBlacklist {
  int uid; //用户Id
  String nickName; //昵称
  String avatarUri; //头像
  int sex; //性别 0-未知 1-男 2-女

  UserBlacklist({this.uid, this.nickName, this.avatarUri, this.sex});

  UserBlacklist.fromJson(Map<String, dynamic> json) {
    uid = json["uid"];
    nickName = json["nickName"];
    avatarUri = json["avatarUri"];
    sex = json["sex"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["uid"] = uid;
    map["nickName"] = nickName;
    map["avatarUri"] = avatarUri;
    map["sex"] = sex;
    return map;
  }

  @override
  String toString() {
    return toJson().toString();
  }
}
